package com.htjx.mall.commons.jackson;

import java.io.IOException;

import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;

/**
 * 空字符串转换成""
 * 
 * @author jingrenlang
 * 
 */
public class NullSerializer extends JsonSerializer<Object> {

	@Override
	public void serialize(Object value, JsonGenerator generator, SerializerProvider provider) throws IOException, JsonProcessingException {
		generator.writeString("");
	}

}
